Conversation
|
Job PR-888-1 is done. |
|
Job PR-888-2 is done. |
| predicts = evaluator.parallel_forward(data) | ||
| for predict, impath in zip(predicts, im_paths): | ||
| predict = mx.nd.squeeze(mx.nd.argmax(predict[0], 1)).asnumpy() + \ | ||
| predict = mx.nd.squeeze(mx.nd.argmax(predict[0], 0)).asnumpy() + \ |
There was a problem hiding this comment.
Following the standard practice, we use the first dimension as Batch dimension by default. Could you please still use dim=1.
zhanghang1989
left a comment
There was a problem hiding this comment.
Could you please address my comment
|
Job PR-888-3 is done. |
| for predict, impath in zip(predicts, im_paths): | ||
| predict = mx.nd.squeeze(mx.nd.argmax(predict[0], 1)).asnumpy() + \ | ||
| testset.pred_offset | ||
| predict = mx.nd.squeeze(mx.nd.argmax(predict, 1), axis=0).\ |
There was a problem hiding this comment.
This will break existing segmentation model, which outputs a list by default.
There was a problem hiding this comment.
What are the elements in the list predict?
I think predicts is a list of NDArray, and predict is a NDArray whose shape is (1, num_cls, height, width)
There was a problem hiding this comment.
predicts is a list of list of NDArray
There was a problem hiding this comment.
@zhanghang1989
Hi, I found the type of predicts is tuple, and the type of predict is NDArray.
Test script: python test.py --dataset pascal_voc --model-zoo psp_resnet101_voc
|
Please rebase the code to resolve conflicts since this PR has been merged into master. |
|
Job PR-888-4 is done. |
|
|
||
| if __name__ == "__main__": | ||
| args = parse_args() | ||
| args.test_batch_size = max(1, args.ngpus) |
There was a problem hiding this comment.
Just want to know why args.test_batch_size here is dependent on args.ngpus. Also since args.batch_size is already defined, is it possible to use this one directly instead of adding a new one like test_batch_size?
There was a problem hiding this comment.
Thank you for the review! I have removed this line, and I will update the code later.
The test_batch_size is defined in train.py, and it is the batch size of testing dataset. For testing script, we should keep the consistency with training procedure.
There was a problem hiding this comment.
Thank you for the review! I have removed this line, and I will update the code later.
The test_batch_size is defined in train.py, and it is the batch size of testing dataset. For testing script, we should keep the consistency with training procedure.
There was a problem hiding this comment.
I don't know why the program gets stuck. I will check it later.
Hi, there.
In the testing script of segmentation, the shape of
predict[0]is(num_cls, height, weight).In the line 71 of
scripts/segmentation/test.py, the axis ofmx.nd.argmaxshould be0.Besides, I modify the code to support the inference of segmentation model on CPU.
Thank you!